var Mock = require('mockjs');

exports.response = function(req, res) {
  return Mock.mock({
    "msg": "OK",
    "code": 0,
    "data": {
      "fieldList": [
        {
          "name": "代码",
          "id": "symbol"
        }, {
          "name": "名称",
          "id": "stockname"
        }, {
          "name": "涨跌幅(%)",
          "id": "chg"
        }, {
          "name": "振幅(%)",
          "id": "amplitude"
        }, {
          "name": "成交额(亿)",
          "id": "stockTraderAmount"
        }, {
          "name": "收盘市值",
          "id": "closeMarketValue"
        }, {
          "name": "原始股数",
          "id": "initialQuantity"
        }, {
          "name": "买入",
          "id": "buy"
        }, {
          "name": "卖出",
          "id": "sell"
        }, {
          "name": "净买入",
          "id": "theNetBuying"
        }, {
          "name": "交易余量",
          "id": "tradeMargin"
        }, {
          "name": "交易额",
          "id": "tradeAmout"
        }, {
          "name": "股数利用率",
          "id": "utilizationRatio"
        }, {
          "name": "盈亏",
          "id": "pnl"
        }, {
          "name": "做多盈亏",
          "id": "longPnl"
        }, {
          "name": "做空盈亏",
          "id": "shortPnl"
        }, {
          "name": "平均收益率",
          "id": "yield"
        }, {
          "name": "平均做多收益率",
          "id": "longYield"
        }, {
          "name": "平均做空收益率",
          "id": "shortYield"
        }, {
          "name": "交易次数",
          "id": "tradeCount"
        }, {
          "name": "获利次数",
          "id": "winTimeCount"
        }, {
          "name": "胜率",
          "id": "winRatio"
        }, {
          "name": "做多次数",
          "id": "longCount"
        }, {
          "name": "做空次数",
          "id": "shortCount"
        }, {
          "name": "平均持仓时间",
          "id": "avgHoldMin"
        }
      ],
      "symbol": null,
      "list": [
        {
          "symbol": "000333.SZ",
          "initialQuantity": 87750,
          "buy": 5100,
          "sell": 5100,
          "theNetBuying": 0,
          "tradeMargin": 82650,
          "tradeCount": 6,
          "winRatio": 0.6667,
          "closeMarketValue": 4792027.5,
          "pnl": -77.58,
          "yield": -0.28,
          "utilizationRatio": 0.05812,
          "longPnl": -77.58,
          "shortPnl": 0,
          "longYield": -0.28,
          "shortYield": 0,
          "winTimeCount": 4,
          "longCount": 6,
          "shortCount": 0,
          "tradeAmout": 282285,
          "stockname": null,
          "chg": null,
          "amplitude": null,
          "stockTraderAmount": null,
          "avgHoldMin": 1.4278
        }, {
          "symbol": "000858.SZ",
          "initialQuantity": 15638,
          "buy": 7000,
          "sell": 7000,
          "theNetBuying": 0,
          "tradeMargin": 8638,
          "tradeCount": 12,
          "winRatio": 0.75,
          "closeMarketValue": 1070733.86,
          "pnl": 826.32,
          "yield": 1.71,
          "utilizationRatio": 0.447628,
          "longPnl": 0,
          "shortPnl": 826.32,
          "longYield": 0,
          "shortYield": 1.71,
          "winTimeCount": 9,
          "longCount": 0,
          "shortCount": 12,
          "tradeAmout": 484180,
          "stockname": null,
          "chg": null,
          "amplitude": null,
          "stockTraderAmount": null,
          "avgHoldMin": 3.0708
        }, {
          "symbol": "002624.SZ",
          "initialQuantity": 29600,
          "buy": 1400,
          "sell": 1400,
          "theNetBuying": 0,
          "tradeMargin": 28200,
          "tradeCount": 1,
          "winRatio": 0,
          "closeMarketValue": 964960,
          "pnl": -80.76,
          "yield": -1.8,
          "utilizationRatio": 0.047297,
          "longPnl": -80.76,
          "shortPnl": 0,
          "longYield": -1.8,
          "shortYield": 0,
          "winTimeCount": 0,
          "longCount": 1,
          "shortCount": 0,
          "tradeAmout": 44828,
          "stockname": null,
          "chg": null,
          "amplitude": null,
          "stockTraderAmount": null,
          "avgHoldMin": 1.85
        }
      ]
    }
  })
}
